# coding : utf-8

"""
"""

import carla

from agents.tools.misc import is_within_distance_ahead

class StaticObstacle:
    """
    filter the static obstacles with trajectory
    根据车辆行驶轨迹，筛选出会影响主车的静态障碍物
    """
    def __init__(self, agent):
        self._vehicle = agent.
        self._world = agent.world
        self._tracking_distance = tracking_distance
        self._sample_resolution = sample_resolution
        self._trajection_buffer = None
        self._obstacles_buffer = None
        return

    def get_obstacles(self):
        """
        获取全部的静态障碍物
        """
        actor = self._world.get_actor()
        return

    def set_local_trace(self, local_buffer):
        for tf,_,_,_ in local_buffer:
            self._trajection_buffer.append(tf)
        return

    def run_step(self):
        """
        返回
        """
        obstacles_ahead = [] # (location, bbox)
        return obstacles_ahead